package com.example.springbootdeom.serviceImpl;

import com.example.springbootdeom.dao.TeacherDao;
import com.example.springbootdeom.entity.*;
import com.example.springbootdeom.service.TeacherService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    TeacherDao teacherDao;

    @Override
    public Teacher getTeacher(int id) {
        return teacherDao.getTeacher(id);
    }

    @Override
    public List<Classs> getClasss(int id) {
        return teacherDao.getClasss(id);
    }

    @Override
    public List<ClassGrade> getStudentClass(int classId, int courseId) {
        return teacherDao.getStudentClass(classId,courseId);
    }

    @Override
    public List<Result> getResult(int rId,int cId) {
        return teacherDao.getResult(rId,cId);
    }

    @Override
    public boolean modifyResult(double reslut,int stuId, int curId) {
        return teacherDao.modifyResult(reslut,stuId,curId);
    }

    @Override
    public List<TeacherCourse> getTeacherCourse(int id) {
        return teacherDao.getTeacherCourse(id);
    }

    @Override
    public List<Student> getClassAllStudent(int id) {
        return teacherDao.getClassAllStudent(id);
    }

    @Override
    public List<Result> getFailAllStudent(int classId, int courseId) {
        return teacherDao.getFailAllStudent(classId,courseId);
    }
}
